package com.longrise.android.loaddata;

public class Demo 
{
	/**
	Button button1 = null;
	Button button2 = null;
	String url = "http://fjisip.yxybb.com/restservices/leap/";
    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        button1 = (Button)this.findViewById(R.id.button1);
        button2 = (Button)this.findViewById(R.id.button2);
        
        button1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) 
			{
				//==================调用方式一========================
				Map<String, String> map = new HashMap<String, String>();
				map.put("cardno", "350701198610200159");
				map.put("pwd", "c26f1c313a734780e0b23cccfaef6344");
//				LoadDataManager.getInstance().callService(AnsynHttpRequest.POST, url, "BBTone_LoginIOS", map, false, new ObserverCallBack() {
//					
//					@Override
//					public void back(String data, String url)
//					{
//						Toast.makeText(getApplicationContext(), data+"", Toast.LENGTH_SHORT).show();
//					}
//				});
				url = "http://59.173.241.186:8042/BBT/restservices/bbapp/";
				//http://59.173.241.186:8042/BBT/restservices/bbapp/bbt_course_sVideoPlayBean/query
					
				//==================调用方式二========================
				//兼容XUtil方式	
				EntityBean bean = new EntityBean();
				bean.set("cardno", "350701198610200159");
				bean.set("pwd", "c26f1c313a734780e0b23cccfaef6344");
				//BBTone_LoginIOS
				LoadDataManager.getInstance().callService(null, url, "bbt_course_sVideoPlayBean", bean, new OnRequestCallListener() {
					
					@Override
					public void onSuccess(String key, String service, Object result) 
					{
						Toast.makeText(getApplicationContext(), result+"", Toast.LENGTH_SHORT).show();	
					}
					
					@Override
					public void onFinished(String key, String service) {
						// TODO Auto-generated method stub
						
					}
					
					@Override
					public void onError(String key, String service, Throwable ex,
							boolean isOnCallback) {
						// TODO Auto-generated method stub
						
					}
				});
			}
		});
        button2.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) 
			{
				for (int i = 0; i < 1; i++) 
				{
//					Map<String, String> map = new HashMap<String, String>();
//					map.put("cardno", "350701198610200159");
//					LoadDataManager.getInstance().callService(AnsynHttpRequest.POST, url, "BBTone_getUserInfo", map, false, new ObserverCallBack() {
//						
//						@Override
//						public void back(String data, String url)
//						{
//							//Toast.makeText(getApplicationContext(), data+"", Toast.LENGTH_SHORT).show();
//							Log.e("=============>", data);
//						}
//					});
					
					EntityBean bean = new EntityBean();
					bean.set("cardno", "350701198610200159");
					LoadDataManager.getInstance().callService(null, url, "BBTone_getUserInfo", bean, new OnRequestCallListener() {
						
						@Override
						public void onSuccess(String key, String service, Object result) 
						{
							if(null != result)
							{
								//Toast.makeText(getApplicationContext(), result.toString() +"", Toast.LENGTH_SHORT).show();	
								Log.e("=============>", result.toString() +"");
							}
							else 
							{
								Log.e("=============>", "result为空");	
							}
							
						}
						
						@Override
						public void onFinished(String key, String service) {
							// TODO Auto-generated method stub
							
						}
						
						@Override
						public void onError(String key, String service, Throwable ex,
								boolean isOnCallback) {
							// TODO Auto-generated method stub
							
						}
					});
				}
			}
		});
        
        
    }
    */
}
